<template>
	<view class="uni-container">
		<uni-steps :options="operList" active-color="#007AFF" direction="column" />
		<!-- <uni-table ref="table" :loading="loading" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
			<uni-tr>
				<uni-th width="150" align="center">环节操作</uni-th>
				<uni-th width="150" align="center">办理时间</uni-th>
				<uni-th align="center">经办人</uni-th>
				<uni-th width="204" align="center">办理意见</uni-th>
			</uni-tr>
			<uni-tr v-for="(item, index) in operList" :key="index">
				<uni-td>{{ item.oper_name }}</uni-td>
				<uni-td>
					<view class="name">{{ item.curr_status_end_date }}</view>
				</uni-td>
				<uni-td align="center">{{ item.user_realname }}</uni-td>
				<uni-td>
					{{item.executor_opinion}}
				</uni-td>
			</uni-tr>
		</uni-table> -->
	</view>
</template>

<script>
	import { getProcess } from "@/api/dums/caw/caseInfo";
	export default {
		name:"case-process",
		props:{
			selectedCase:{
				type:Object
			}
		},
		data() {
			return {
				active:0,
				operList:[],
				loading:false
			}
		},
		mounted(){
			console.log(this.selectedCase);
			this.getProcess()
		},
		methods: {
			getProcess() {
				console.log(this.selectedCase.caseId)
				getProcess({ caseId: this.selectedCase.caseId }).then((res) => {
					console.log(res);
					if (res) {
						for(let i=0;i<res.rows.length;i++){
							res.rows[i].title = res.rows[i].oper_name;
							if(i>0){
								res.rows[i].desc = (res.rows[i].curr_status_end_date||"")+"   "+(res.rows[i].user_realname||"")+"\n"+(res.rows[i].executor_opinion||"");
							}
						}
						this.operList = res.rows;
					}
				});
			},
			selectionChange(){
				
			}
		}
	}
</script>

<style>
</style>